
#ifndef GEOMETRYPANEL_H
#define GEOMETRYPANEL_H

#include <BGeometry>

#include <BLabel>
#include <BButton>
#include <BLineEdit>
#include <BCheckBox>
#include <BTableWidget>
#include <BGroupBox>

using namespace BWE;

class GeometryPanel : public BGroupBox
{
	BOBJECT(GeometryPanel)
public:
	GeometryPanel(BWidget* parent = 0);
	~GeometryPanel();

protected:
	const char* primitiveName(Primitive primitive);

protected:
	void slotAssetChanged(BObject* object, const BValue& value);
	void slotOptimizedToggled(BObject* object, const BValue& value);
	void slotNormalSmoothButtonClicked(BObject* object, const BValue& value);
	void slotFacesReverseButtonClicked(BObject* object, const BValue& value);
	void slotElementTableItemClicked(BObject* object, const BValue& value);
	void slotElementNameEditFinished(BObject* object, const BValue& value);
	void slotElementNameEditFocused(BObject* object, const BValue& value);
	void slotGeometryAttached(BObject* object, const BValue& value);
	void slotGeometryDetached(BObject* object, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

protected:
	BCheckBox*			_optimizedCheckBox;
	BButton*			_normalSmoothButton;
	BButton*			_facesReverseButton;
	BButton*			_edgeMergeButton;
	BLabel*				_vertexCountLabel;
	BLabel*				_normalCountLabel;
	BLabel*				_colorCountLabel;
	BLabel*				_texCoordCountLabel;
	BTableWidget*		_elementTableWidget;
	BLineEdit*			_elementNameEdit;

	BHolder<BGeometry>		_geometry;

};

#endif
